namespace game {
    export class RoleScript extends Laya.Animation {
        private _hpBar: Laya.Image
        private _nameLabel: Laya.Label
        private _roleAnimation: Laya.Animation
        constructor() {
            super()
            this.frameOnce(2, this, this.onFrame);
        }

        private onFrame(): void {
            this._nameLabel = this.getChildByName("nameLabel") as Laya.Label
            this._hpBar = this.getChildByName("hpBar") as Laya.Image
            this._roleAnimation = this.getChildByName("roleAnimation") as Laya.Animation

            this.loadAnimation("role/wyd/wyd_walk.ani");
            this.play()
        }
    }
}